<template>
	<view class="content">
		<view class="header">
			<view class="header_bg">
				<view class="add_teacher">
					<button type="default">新增老师</button>
				</view>

				<view class="addlist">
					<view class="addlist1">
						<view class="addlist1_lf">
							<text>老师姓名</text>
						</view>
						<view class="addlist1_rg">
							<input type="text" value="" placeholder="请输入" />
						</view>
					</view>
					<view class="addlist1">
						<view class="addlist1_lf">
							<text>老师电话</text>
						</view>
						<view class="addlist1_rg">
							<input type="text" value="" placeholder="请输入" />
						</view>
					</view>
					<view class="addlist1">
						<view class="addlist1_lf">
							<text>绑定幼儿园</text>
						</view>
						<view class="addlist1_rg">
							<picker @change="bindPickerChange" :value="index" :range="array">
								<view class="uni-input">{{array[index] ||'请选择'}}</view>
							</picker>
						</view>
					</view>
					
					<view class="addbt">
						<button type="default">新增</button>
					</view>
				</view>
				
				
				<view class="teacherlisttit">
					<text>老师列表</text>
				</view>
				<view class="teacherlist" v-for="(item,index) in teacherlist">
					<view class="tclist1">
						<text>{{item.title}}</text>
					</view>
					<view class="tclist2">
						<text>手机号：{{item.phone}}</text>
					</view>
					<view class="tclist3">
						<image src="../../../static/school/zs1.png" mode=""></image>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				array: ['', '中国', '美国', '巴西', '日本'],
				index: 0,
				teacherlist:[
					{
						id:0,
						title:'姓名',
						 phone:'1888888888'
					},
					{
						id:0,
						title:'姓名',
						 phone:'1888888888'
					},
					{
						id:0,
						title:'姓名',
						 phone:'1888888888'
					}
				]
			}
		},
		methods: {
			bindPickerChange: function(e) {
				console.log('picker发送选择改变，携带值为', e.detail.value)
				this.index = e.detail.value
			},
		}
	}
</script>

<style>
	.content {
		width: 750rpx;
		height: 1624rpx;
		background: #FAFAFA;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.header {
		width: 750rpx;
		height: 240rpx;
		background: linear-gradient(180deg, #1789FF 0%, #93C3F9 100%);
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.header_bg {
		padding-top: 40rpx;
	}

	.add_teacher {
		margin: auto;
	}

	.add_teacher button {
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #1889FF;
		width: 690rpx;
		height: 96rpx;
		background: #FFFFFF;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.addlist {
		width: 690rpx;
		height: 436rpx;
		background: #FFFFFF;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 40rpx auto 0;
		padding-top: 24rpx;
	}

	.addlist1 {
		display: flex;
		align-items: center;
		justify-content: center;
		margin-bottom: 28rpx;
	}

	.addlist1_lf {
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #333333;
		width: 30%;
	}

	.addlist1_rg {
		width: 70%;
		width: 376rpx;
		height: 72rpx;
		background: #FFFFFF;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		border: 2rpx solid #999999;
		display: flex;
		align-items: center;
		padding-left: 24rpx;
	}
	.addbt{
		margin: auto;
	}
	.addbt button{
		width: 480rpx;
		height: 80rpx;
		background: #409CFD;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.teacherlisttit{
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #333333;
		margin-top: 40rpx;
		margin-left: 30rpx;
	}
	.teacherlist{
		width: 690rpx;
		height: 116rpx;
		background: #FFFFFF;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		margin: 32rpx auto 0;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.tclist1{
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 28rpx;
		color: #333333;
		width: 30%;
		padding-left: 40rpx;
		
	}
	.tclist2{
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 28rpx;
		color: #333333;
		width: 55%;
	}
	.tclist3{
		width: 15%;
	}
	.tclist3 image{
		width: 70rpx;
		height: 40rpx;
	}
</style>